package br.client;


import java.rmi.RemoteException;

import br.common.Calculadora;
import br.common.remoteobjects.ObjExpressao;


public class MainClient {
	
	
	public static void main(String[] args) {		
		
		//RMI padrao
		CalculadoraCliente calc = new CalculadoraCliente();
		
		try {
			calc.fazCalculo(10);
			ObjExpressao exp = calc.fazSoma(10, 10);
			System.out.println(exp.getExpressao() + " " +exp.getResult());
		} catch (RemoteException e) {
			System.out.println("Servidor deu pau");
			e.printStackTrace();
		}
		
		//RMI Callback
		
		LeilaoClient leilao = new LeilaoClient(); 
		try {
			leilao.fazLance(20);
		} catch (RemoteException e) {
			System.out.println("Servidor deu pau");
			e.printStackTrace();
		}
		
		
		
	}
	
	

}
